<include file="Common/common" />

<body>
	
	<div class="layui-tab-item layui-show">
		<div class="layui-main">
			<br>
			<div class="layui-tab">
				<ul class="layui-tab-title">
					<li class="layui-this">中心积分->注册积分</li>
					<li>动态积分->注册积分</li>
					<li>动态积分->中心积分</li>
				</ul>
				<div class="layui-tab-content">
					<!-- 中心积分->注册积分 -->
					<div class="layui-tab-item layui-show">
						<form class="layui-form" id="cenToReg-form" action="">
							<div class="layui-form-item">
								<div class="layui-form-mid layui-word-aux">您当前的中心积分:<span style="color: red;">{$score_center}</span>,注册积分:<span style="color: red;">{$score_register}</span>,当前转换比例 <span style="color: red;">1:1</span></div>
							</div>
							<div class="layui-form-item">
								<label class="layui-form-label">转换数量</label>
								<div class="layui-input-block">
									<input type="number"  name="cenToReg" lay-verify="required" min="0" max="{$score_center}" step="0.01" onkeyup="checknum(this);" autocomplete="off" placeholder="最大可转换{$score_center}" class="layui-input">
								</div>
							</div>
							<div class="layui-form-item">
								<div class="layui-input-block" style="margin-left: 105px;">
									<button class="layui-btn" lay-submit="" lay-filter="btn-cenToReg">确定</button>
								</div>
							</div>
						</form>
					</div>

					<!-- 动态积分->注册积分 -->
					<div class="layui-tab-item">
						<form class="layui-form" id="dynToReg-form" action="">
							<div class="layui-form-item">
								<div class="layui-form-mid layui-word-aux">您当前的动态积分:<span style="color: red;">{$score_dynamic}</span>,注册积分:<span style="color: red;">{$score_register}</span>,当前转换比例 <span style="color: red;">1:1</span></div>
							</div>
							<div class="layui-form-item">
								<label class="layui-form-label">转换数量</label>
								<div class="layui-input-block">
									<input type="number"  name="dynToReg" lay-verify="required" min="0" max="{$score_dynamic}" step="0.01" onkeyup="checknum(this);" autocomplete="off" placeholder="最大可转换{$score_dynamic}" class="layui-input">
								</div>
							</div>
							<div class="layui-form-item">
								<div class="layui-input-block" style="margin-left: 105px;">
									<button class="layui-btn" lay-submit="" lay-filter="btn-dynToReg">确定</button>
								</div>
							</div>
						</form>
					</div>

					<!-- 动态积分->中心积分 -->
					<div class="layui-tab-item">
						<form class="layui-form" id="dynToCen-form" action="">
							<div class="layui-form-item">
								<div class="layui-form-mid layui-word-aux">您当前的动态积分:<span style="color: red;">{$score_dynamic}</span>,中心积分:<span style="color: red;">{$score_center}</span>,当前转换比例 <span style="color: red;">1:1</span></div>
							</div>
							<div class="layui-form-item">
								<label class="layui-form-label">转换数量</label>
								<div class="layui-input-block">
									<input type="number"  name="dynToCen" lay-verify="required" min="0" max="{$score_dynamic}" step="0.01" onkeyup="checknum(this);" autocomplete="off" placeholder="最大可转换{$score_dynamic}" class="layui-input">
									<div class="layui-form-mid layui-word-aux">
										购买数量从500起,100的倍数,手续费0%
									</div>
								</div>

							</div>
							<div class="layui-form-item">
								<div class="layui-input-block" style="margin-left: 105px;">
									<button class="layui-btn" lay-submit="" lay-filter="btn-dynToCen">确定</button>
								</div>
							</div>
						</form>
					</div>
				</div>
			</div>
		</div>
	</div>
</body>

<script type="text/javascript">
	// 验证数字
   	function checknum(obj){   
     	if(/^\d+\.?\d{0,2}$/.test(obj.value)){
        	obj.value = obj.value;
     	}else{
        	obj.value = obj.value.substring(0,obj.value.length-1);
     	}     
   	}
</script>
<include file="Common/footer" />